// components/appbar/appbar.js
Component({
  properties: {
    backVisiable: {
      type: Boolean,
      value: true,
    },
    backText: {
      type: String,
      value: "退出"
    },
    title: {
      type: String,
      value: ""
    }
  },
  
  data: {
    barInfo: {}
  },

  lifetimes: {
    ready() {
      this.setData({
        barInfo: wx.getMenuButtonBoundingClientRect()
      })
    }
  },

  methods: {
    backTap() {
      // 触发 BackTap 方法，可被使用组件的页面用 bindBackTap 监听到
      this.triggerEvent('BackTap')
    }
  }
})
